According to World Health Organization (WHO) a pandemic is the worldwide spread of a new disease. Influenza pandemics are unpredictable but recurring events that can significantly affect wealth, communities and economies worldwide. Planning and preparation are critical to help mitigate the risk and impact of a pandemic, and to manage the response and recovery. Governments take cautions against such pandemics by enforcing some policies. These policies show differences in different countries based on their development, population, and economics. There is an ongoing pandemic caused by Covid-19 which have taken many lives. We will be focusing on this pandemic to understand the nature of how government actions can affect the spread of the disease. Then, we will use this information to prevent deaths.
One of the datasets we used in our research shows number of infected and deceased people day by day in different countries between 22nd January 2020 and 15th May 2021 but we used 31st December of 2020 to match with our other dataset. The other dataset we used shows the policies different countries have taken in certain dates.
Link to the first dataset can be found as a csv file from the website: https://ourworldindata.org/policy-responses-covid
Link to the second dataset can be found as a excel file from the website: https://www.acaps.org/covid-19-government-measures-dataset
First, we imported the data from the dataset that shows information about the countries and their daily number of cases.
## [1] "iso_code"
## [2] "continent"
## [3] "location"
## [4] "date"
## [5] "total_cases"
## [6] "new_cases"
## [7] "new_cases_smoothed"
## [8] "total_deaths"
## [9] "new_deaths"
## [10] "new_deaths_smoothed"
## [11] "total_cases_per_million"
## [12] "new_cases_per_million"
## [13] "new_cases_smoothed_per_million"
## [14] "total_deaths_per_million"
## [15] "new_deaths_per_million"
## [16] "new_deaths_smoothed_per_million"
## [17] "reproduction_rate"
## [18] "icu_patients"
## [19] "icu_patients_per_million"
## [20] "hosp_patients"
## [21] "hosp_patients_per_million"
## [22] "weekly_icu_admissions"
## [23] "weekly_icu_admissions_per_million"
## [24] "weekly_hosp_admissions"
## [25] "weekly_hosp_admissions_per_million"
## [26] "new_tests"
## [27] "total_tests"
## [28] "total_tests_per_thousand"
## [29] "new_tests_per_thousand"
## [30] "new_tests_smoothed"
## [31] "new_tests_smoothed_per_thousand"
## [32] "positive_rate"
## [33] "tests_per_case"
## [34] "tests_units"
## [35] "total_vaccinations"
## [36] "people_vaccinated"
## [37] "people_fully_vaccinated"
## [38] "new_vaccinations"
## [39] "new_vaccinations_smoothed"
## [40] "total_vaccinations_per_hundred"
## [41] "people_vaccinated_per_hundred"
## [42] "people_fully_vaccinated_per_hundred"
## [43] "new_vaccinations_smoothed_per_million"
## [44] "stringency_index"
## [45] "population"
## [46] "population_density"
## [47] "median_age"
## [48] "aged_65_older"
## [49] "aged_70_older"
## [50] "gdp_per_capita"
## [51] "extreme_poverty"
## [52] "cardiovasc_death_rate"
## [53] "diabetes_prevalence"
## [54] "female_smokers"
## [55] "male_smokers"
## [56] "handwashing_facilities"
## [57] "hospital_beds_per_thousand"
## [58] "life_expectancy"
## [59] "human_development_index"
In this dataset there are 59 columns. But we will be needing the columns “location”, “date”, “new_cases”.
## location date new_cases
## 1 Afghanistan 2020-02-24 1
## 2 Afghanistan 2020-02-25 0
## 3 Afghanistan 2020-02-26 0
## 4 Afghanistan 2020-02-27 0
## 5 Afghanistan 2020-02-28 0
## 6 Afghanistan 2020-02-29 0
Our dataset now has 3 columns we need and 89457 rows of information from 180 countries.
Then we imported our second dataset that shows the countries and the measures and the dates they were implented.
## [1] "ID" "ISO" "COUNTRY"
## [4] "REGION" "ADMIN_LEVEL_NAME" "PCODE"
## [7] "LOG_TYPE" "CATEGORY" "MEASURE"
## [10] "TARGETED_POP_GROUP" "COMMENTS" "NON_COMPLIANCE"
## [13] "DATE_IMPLEMENTED" "SOURCE" "SOURCE_TYPE"
## [16] "LINK" "ENTRY_DATE" "Alternative source"
In this dataset there are 18 columns. But we will be needing the columns “COUNTRY”, MEASURE“,”COMMENTS“, and”DATE_IMPLEMENTED".
## COUNTRY DATE_IMPLEMENTED
## 1 Afghanistan 2020-01-24
## 2 Afghanistan 2020-01-26
## 3 Afghanistan 2020-01-27
## 4 Afghanistan 2020-01-27
## 5 Afghanistan 2020-02-01
## 6 Afghanistan 2020-02-02
## MEASURE
## 1 Awareness campaigns
## 2 Health screenings in airports and border crossings
## 3 International flights suspension
## 4 Health screenings in airports and border crossings
## 5 Border checks
## 6 Strengthening the public health system
## COMMENTS
## 1 MoPH begins announcements on their facebook to make public aware of coronavirus.
## 2 Health teams at airports will check passengers coming from China.
## 3 Flights to China are suspended.
## 4 Health screenings of all passengers at airports.
## 5 All China and Iran nationals
## 6 the ministry has prepared 100 bed to control this virus in Kabul and 200 others in the province hospital with all the facilities needed in the country.
Our dataset now has 4 columns we need and 23923 rows of information from 180 countries.
Then, we added countries from each continent. Some of these countries are the most advanced countries with a large population of the continents they are in. Then, we wanted to add the countries that we are familiar with the policies of and successful at slowing down the Coronavirus. After some discussions we had more than one countries from some continents. In the end, we had 11 countries from different continents. These countries in alphabetical order are:
1 - Brazil
2 - China
3 - Israel
4 - Italy
5 - New Zealand
6 - Nigeria
7 - Norway
8 - Russia
9 - Turkey
10 - United States of America
Since our datasets had different column names for the columns we wanted to merge, we needed to change the column names of the second dataset.
## [1] "location" "date" "MEASURE" "COMMENTS"
## [1] "location" "date" "new_cases"
Now we have the matching names for country names and dates and it is time to merge them.
## location date new_cases MEASURE
## 50 Brazil 2020-04-08 2136 Limit public gatherings
## 51 Brazil 2020-04-08 2136 Domestic travel restrictions
## 52 Brazil 2020-04-08 2136 Border closure
## 53 Brazil 2020-04-08 2136 Schools closure
## 54 Brazil 2020-04-08 2136 Closure of businesses and public services
## 55 Brazil 2020-04-08 2136 Limit public gatherings
## 56 Brazil 2020-04-08 2136 Domestic travel restrictions
## COMMENTS
## 50 ban on gatherings of 30 or more people, and the cancellation of public events until at least April 30.
## 51 flights from Rio de Janeiro and Sao Paulo have been canceled until further notice
## 52 closure of all ground border crossings to nonresident foreign nationals through at least May 2, while entry by water remains prohibited through April 30. extended until at least 2/5/2020
## 53 extended until furher notice
## 54 extneded: all non essentials until 3/5/2020
## 55 In Bahia, the authorities have banned gatherings of more than 50 people until 19 April.
## 56 extended reduced public transportation until 3 May.
As it is seen above, we can now work with location, date, new_cases, MEASURE, and COMMENTS columns all together.
ggplotly(pTurkey)